Какова разница между IEnumerable и IQueryable при работе с удаленной базой данных?
IEnumerable представляет собой коллекцию данных, находящуюся в памяти, и позволяет перемещаться по этим данным только в одном направлении — вперед. В отличие от него, IQueryable находится в пространстве имен System.Linq и предоставляет возможность удаленного доступа к базе данных. Он позволяет перемещаться по данным как в прямом, так и в обратном порядке. При выполнении запроса происходит его оптимизация, что делает работу с данными более эффективной.
IEnumerable phoneIEnum = db.Phones; var phones1 = phoneIEnum.Where(p => p.Id > id).ToList(); //SELECT * FROM PHONES, фильтрация на стороне клиента IQueryable phoneIQuer = db.Phones; int id = 3; var phones2 = phoneIQuer.Where(p => p.Id > id).ToList(); //SELECT * FROM PHONES WHERE ID > 3
Какова разница между IEnumerable и IQueryable при работе с удаленной базой данных?
IEnumerable представляет собой коллекцию данных, находящуюся в памяти, и позволяет перемещаться по этим данным только в одном направлении — вперед. В отличие от него, IQueryable находится в пространстве имен System.Linq и предоставляет возможность удаленного доступа к базе данных. Он позволяет перемещаться по данным как в прямом, так и в обратном порядке. При выполнении запроса происходит его оптимизация, что делает работу с данными более эффективной.
IEnumerable phoneIEnum = db.Phones; var phones1 = phoneIEnum.Where(p => p.Id > id).ToList(); //SELECT * FROM PHONES, фильтрация на стороне клиента IQueryable phoneIQuer = db.Phones; int id = 3; var phones2 = phoneIQuer.Where(p => p.Id > id).ToList(); //SELECT * FROM PHONES WHERE ID > 3
BY Библиотека собеса по C# | вопросы с собеседований
Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283
To pay the bills, Mr. Durov is issuing investors $1 billion to $1.5 billion of company debt, with the promise of discounted equity if the company eventually goes public, the people briefed on the plans said. He has also announced plans to start selling ads in public Telegram channels as soon as later this year, as well as offering other premium services for businesses and users.
That growth environment will include rising inflation and interest rates. Those upward shifts naturally accompany healthy growth periods as the demand for resources, products and services rise. Importantly, the Federal Reserve has laid out the rationale for not interfering with that natural growth transition.It's not exactly a fad, but there is a widespread willingness to pay up for a growth story. Classic fundamental analysis takes a back seat. Even negative earnings are ignored. In fact, positive earnings seem to be a limiting measure, producing the question, "Is that all you've got?" The preference is a vision of untold riches when the exciting story plays out as expected.
Библиотека собеса по C | вопросы с собеседований from ye